3.2445 \(\int x^2 \left (a+b x^n\right ) \, dx\)

Optimal. Leaf size=21 \[ \frac{a x^3}{3}+\frac{b x^{n+3}}{n+3} \]

[Out]

(a*x^3)/3 + (b*x^(3 + n))/(3 + n)

_______________________________________________________________________________________

Rubi [A]  time = 0.021508, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ \frac{a x^3}{3}+\frac{b x^{n+3}}{n+3} \]

Antiderivative was successfully verified.

[In]  Int[x^2*(a + b*x^n),x]

[Out]

(a*x^3)/3 + (b*x^(3 + n))/(3 + n)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 3.6623, size = 15, normalized size = 0.71 \[ \frac{a x^{3}}{3} + \frac{b x^{n + 3}}{n + 3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2*(a+b*x**n),x)

[Out]

a*x**3/3 + b*x**(n + 3)/(n + 3)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0163777, size = 21, normalized size = 1. \[ \frac{a x^3}{3}+\frac{b x^{n+3}}{n+3} \]

Antiderivative was successfully verified.

[In]  Integrate[x^2*(a + b*x^n),x]

[Out]

(a*x^3)/3 + (b*x^(3 + n))/(3 + n)

_______________________________________________________________________________________

Maple [A]  time = 0.014, size = 23, normalized size = 1.1 \[{\frac{b{x}^{3}{{\rm e}^{n\ln \left ( x \right ) }}}{3+n}}+{\frac{a{x}^{3}}{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2*(a+b*x^n),x)

[Out]

b/(3+n)*x^3*exp(n*ln(x))+1/3*a*x^3

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*x^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.236021, size = 38, normalized size = 1.81 \[ \frac{3 \, b x^{3} x^{n} +{\left (a n + 3 \, a\right )} x^{3}}{3 \,{\left (n + 3\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*x^2,x, algorithm="fricas")

[Out]

1/3*(3*b*x^3*x^n + (a*n + 3*a)*x^3)/(n + 3)

_______________________________________________________________________________________

Sympy [A]  time = 1.02459, size = 51, normalized size = 2.43 \[ \begin{cases} \frac{a n x^{3}}{3 n + 9} + \frac{3 a x^{3}}{3 n + 9} + \frac{3 b x^{3} x^{n}}{3 n + 9} & \text{for}\: n \neq -3 \\\frac{a x^{3}}{3} + b \log{\left (x \right )} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2*(a+b*x**n),x)

[Out]

Piecewise((a*n*x**3/(3*n + 9) + 3*a*x**3/(3*n + 9) + 3*b*x**3*x**n/(3*n + 9), Ne
(n, -3)), (a*x**3/3 + b*log(x), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.212706, size = 42, normalized size = 2. \[ \frac{a n x^{3} + 3 \, b x^{3} e^{\left (n{\rm ln}\left (x\right )\right )} + 3 \, a x^{3}}{3 \,{\left (n + 3\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*x^2,x, algorithm="giac")

[Out]

1/3*(a*n*x^3 + 3*b*x^3*e^(n*ln(x)) + 3*a*x^3)/(n + 3)